package com.ten.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ten.common.core.entity.AclUser;
import com.ten.common.core.vo.Result;
import com.ten.system.vo.UserVo;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author ：Q大侠
 * @date ：Created in 2022/12/1 19:50
 * @description：用户管理
 * @modified By：
 * @version:
 */
public interface AclUserService {
    Result findByName(String username);
    Result<AclUser> findUserinfo();    /**
     * 根据条件分页查询用户列表
     * @param current 页码
     * @param pageSize 每页显示的条数
     * @param userVo 条件类
     * @return
     */
    Result<IPage<AclUser>>  findByConditionPage(Integer current, Integer pageSize, UserVo userVo);
    /** 
     * @create by:  Q大侠
     * @description: 用户禁用/启用 
     * @create time: 2022/12/8 3:35
      * @param id,isDeleted
     * @return  
     */
    Result<IPage<AclUser>> updateUserStatusByid(String id, Integer isDeleted);
    /** 
     * @create by:  Q大侠
     * @description: 添加管理员账户 
     * @create time: 2022/12/9 17:10
      * @param aclUser 
     * @return Result<IPage<AclUser>>
     */
    Result<IPage<AclUser>> addUserByUser(AclUser aclUser);

    /** 
     * @create by:  Q大侠
     * @description: 根据id删除管理员账户 
     * @create time: 2022/12/9 18:03
      * @param id 
     * @return Result<IPage<AclUser>>
     */
    Result<IPage<AclUser>> deleteUserById(String id);
    /** 
     * @create by:  Q大侠
     * @description: 根据用户名修改备注
     * @create time: 2022/12/9 19:27
      * @param aclUser 
     * @return Result<IPage<AclUser>> 
     */
    Result<IPage<AclUser>> updateUserByUser(AclUser aclUser);
    /** 
     * @create by:  Q大侠
     * @description: 修改当前账户的密码 
     * @create time: 2022/12/9 20:05
      * @param oldPassword,newPassword
     * @return Result<IPage<AclUser>>
     */
    Result<IPage<AclUser>> updateUserPassword(String oldPassword,String newPassword);

    Result<AclUser> uploadAvator(MultipartFile file);
}
